/* children属性
可以是任意数据类型,需要掌握的是函数
 */
import React, { Component } from 'react';

export default class App extends Component {
  render() {
    return (
      <div>
        <Child msg="hello">{() => <i>我是</i>}</Child>
      </div>
    );
  }
}
class Child extends React.Component {
  render() {
    const { Children } = this.props;
    return (
      <div>
        <h2>我是子</h2>
        <h1>{Children()}</h1>
      </div>
    );
  }
}
